using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
namespace SRW.SetInfo
{
   class SetWtpaper
   {
      public static SqlCommand Set_Wtpaper_Data(SqlCommand cmd, Wtpaper mWtpaper,bool CheckPk)
      {
         
         if (!(string.IsNullOrEmpty(mWtpaper.pkID.ToString())))
         {
            if (CheckPk)
               cmd.Parameters.AddWithValue("@pkID", mWtpaper.pkID);
         }
         if (!(string.IsNullOrEmpty(mWtpaper.papername.ToString())))
         {
         cmd.Parameters.AddWithValue("@papername", mWtpaper.papername);
         }
         if (!(string.IsNullOrEmpty(mWtpaper.papertype.ToString())))
         {
         cmd.Parameters.AddWithValue("@papertype", mWtpaper.papertype);
         }
         if (!(string.IsNullOrEmpty(mWtpaper.problemID.ToString())))
         {
         cmd.Parameters.AddWithValue("@problemID", mWtpaper.problemID);
         }
         if (!(string.IsNullOrEmpty(mWtpaper.wtdifficulty.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtdifficulty", mWtpaper.wtdifficulty);
         }
         if (!(string.IsNullOrEmpty(mWtpaper.sinoname.ToString())))
         {
         cmd.Parameters.AddWithValue("@sinoname", mWtpaper.sinoname);
         }
         if (!(string.IsNullOrEmpty(mWtpaper.problemType.ToString())))
         {
         cmd.Parameters.AddWithValue("@problemType", mWtpaper.problemType);
         }
         return cmd;
      }
   }
}
